(global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/setAddress/index" ], {
    "0524": function(t, e, i) {},
    "071e": function(t, e, i) {
        "use strict";
        (function(t, e) {
            var n = i("4ea4");
            i("18ba"), n(i("66fd"));
            var r = n(i("f410"));
            t.__webpack_require_UNI_MP_PLUGIN__ = i, e(r.default);
        }).call(this, i("bc2e").default, i("543d").createPage);
    },
    "0870": function(t, e, i) {
        "use strict";
        i.d(e, "b", function() {
            return r;
        }), i.d(e, "c", function() {
            return o;
        }), i.d(e, "a", function() {
            return n;
        });
        var n = {
            AreaSelect: function() {
                return i.e("components/AreaSelect/AreaSelect").then(i.bind(null, "1aef"));
            }
        }, r = function() {
            this.$createElement, this._self._c;
        }, o = [];
    },
    "1ef0": function(t, e, i) {
        "use strict";
        (function(t) {
            Object.defineProperty(e, "__esModule", {
                value: !0
            }), e.default = void 0;
            var n = i("a7b1"), r = {
                data: function() {
                    return {
                        headName: null,
                        tags: [ "家", "公司", "学校" ],
                        uuid: "",
                        form: {
                            consignee: "",
                            phone: "",
                            province: "",
                            city: "",
                            district: "",
                            address: "",
                            tag: "",
                            is_default: 0
                        }
                    };
                },
                computed: {
                    defaultValue: function() {
                        return [ this.form.province, this.form.city, this.form.district ];
                    },
                    defaultAddressValue: function() {
                        return this.form.province ? [ this.form.province, this.form.city, this.form.district ] : null;
                    },
                    pickerSelected: function() {
                        return this.form.province ? this.form.province + "-" + this.form.city + "-" + this.form.district : "";
                    }
                },
                onLoad: function(e) {
                    if (t.setNavigationBarTitle({
                        title: e.uuid ? "编辑收货地址" : "新建收货地址"
                    }), console.log(e.uuid, "qq"), null == e.uuid ? this.headName = "新建收货地址" : this.headName = "编辑收货地址", 
                    e.uuid) {
                        this.uuid = e.uuid, t.setNavigationBarTitle({
                            title: "编辑收货地址"
                        });
                        var i = this.$navigator.getParameters() || {};
                        this.form = {
                            consignee: i.consignee,
                            phone: i.phone,
                            province: i.province,
                            city: i.city,
                            district: i.district,
                            address: i.address,
                            tag: i.tag,
                            is_default: i.is_default
                        };
                    }
                },
                methods: {
                    handleClick: function(t) {
                        this.form.tag = t.currentTarget.dataset.tag;
                    },
                    switchChange: function(t) {
                        this.form.is_default = t ? 1 : 0;
                    },
                    change: function(t) {
                        var e = t.detail.value;
                        this.form.province = e[0], this.form.city = e[1], this.form.district = e[2];
                    },
                    areaChange: function(t) {
                        var e = t.labelArr;
                        this.form.province = e[0], this.form.city = e[1], this.form.district = e[2];
                    },
                    handleSubmit: function() {
                        var e = this.form;
                        e.consignee ? /^1\d{10}$/.test(e.phone) ? this.pickerSelected ? e.address ? (t.showLoading({
                            title: "加载中"
                        }), this.uuid ? (0, n.updateAddress)(e, this.uuid).then(function(e) {
                            t.navigateBack({
                                delta: 1
                            });
                        }) : (0, n.createAddress)(e).then(function(e) {
                            t.navigateBack({
                                delta: 1
                            });
                        })) : t.showToast({
                            title: "请填写详细地址",
                            icon: "none"
                        }) : t.showToast({
                            title: "请选择所在地区",
                            icon: "none"
                        }) : t.showToast({
                            title: "请填写正确的手机号",
                            icon: "none"
                        }) : t.showToast({
                            title: "请填写收货人姓名",
                            icon: "none"
                        });
                    }
                }
            };
            e.default = r;
        }).call(this, i("543d").default);
    },
    "3ef3": function(t, e, i) {
        "use strict";
        i.r(e);
        var n = i("1ef0"), r = i.n(n);
        for (var o in n) [ "default" ].indexOf(o) < 0 && function(t) {
            i.d(e, t, function() {
                return n[t];
            });
        }(o);
        e.default = r.a;
    },
    f054: function(t, e, i) {
        "use strict";
        var n = i("0524");
        i.n(n).a;
    },
    f410: function(t, e, i) {
        "use strict";
        i.r(e);
        var n = i("0870"), r = i("3ef3");
        for (var o in r) [ "default" ].indexOf(o) < 0 && function(t) {
            i.d(e, t, function() {
                return r[t];
            });
        }(o);
        i("f054");
        var a = i("f0c5"), c = Object(a.a)(r.default, n.b, n.c, !1, null, null, null, !1, n.a, void 0);
        e.default = c.exports;
    }
}, [ [ "071e", "common/runtime", "common/vendor" ] ] ]);